package com.ll.tankgame;

/**
 * @author liubw
 * @date 2024/6/24 0024
 */
public class Hero extends Tank{

    Shot shot = null;
    private int type = 0;
    public Hero(int x, int y) {
        super(x, y);
    }

    public int getType() {
        return type;
    }


    public void shotEnemyTank(){
        System.out.println(getDirection());
        switch (getDirection()){
            case 0:
                shot = new Shot();
                shot.setShot(getX()+20,getY(),0);
            case 1:
                shot = new Shot();
                shot.setShot(getX()+60,getY()+30,1);
            case 2:
                shot = new Shot();
                shot.setShot(getX()+20,getY()+60,2);
            case 3:
                shot = new Shot();
                shot.setShot(getX(),getY()+30,3);
        }
        new Thread(shot).start();
    }
}
